// op定制special

import {r as x, a as Q} from "./index-81253c65.js";
import {r as c, w as z, l as d, S as M, R as n, p as t, O as r, u as i, V as g, e as B, d as Y, aC as Z, aD as ee, m, X as k, W as C, P as D, a8 as A} from "./vue-vendor-99582fd3.js";
import {v as R, e as T, q as te, t as le, d as b, i as oe, k as ae, l as re, m as q, n as se, r as ie} from "./ui-vendor-ea95f259.js";
import {u as ne, r as U} from "./axios-4a6bab72.js";
import {V as ue} from "./VideoGrid-92565e99.js";
import {V as de, l as ce} from "./VideoPlayer-1a2effc5.js";
import {V as ve} from "./viewBack-26ade50e.js";
import {_ as pe} from "./_plugin-vue_export-helper-c27b6911.js";
import "./video-js-46e45aa5.js";

const fe = { class: "dialog-wrapper" }
  , me = { class: "relative z-10 p-6" }
  , ge = { class: "text-center mb-6" }
  , ye = { class: "mx-auto w-16 h-16 rounded-full bg-gradient-to-br from-purple-600/20 to-blue-600/20 flex items-center justify-center mb-3 border border-purple-500/30" }
  , _e = { class: "flex flex-col gap-3" }
  , be = { __name: "TrialVideoDialog", /* ... */ }  // 移除TrialVideoDialog相关代码
  , he = pe(be, [["__scopeId", "data-v-cfdc45f7"]]);

const Ve = { class: "p w-full mt-2 rounded-lg border border-neutral-700" }
  , we = { key: 0 }
  , xe = { key: 1, class: "rounded-lg border border-neutral-700 relative bg-cover bg-center flex justify-center items-center overflow-hidden", style: { "padding-top": "calc(6/10 * 100%)" } }
  , ke = ["src"]
  , Ue = { class: "absolute inset-0 flex justify-center items-center bg-black bg-opacity-50" }
  , Ie = { class: "userLoginInfoBox text-center" }
  , Pe = { class: "my-2" }
  , Ce = { class: "flex items-center" }
  , Te = { class: "flex items-center" }
  , Le = { class: "flex items-center" }
  , je = { class: "mt-4" }
  , Be = ["href"]
  , De = ["src"]
  , Re = { class: "mt-4" }
  , $e = ["href"]
  , Ne = ["src"]
  , Ee = { class: "mt-4" }
  , Se = { class: "flex justify-between mb-2" }
  , ze = { class: "flex items-center" }
  , Ae = ["src"];

const tt = {
    __name: "specialVideoInfo",
    setup($) {
        const y = ne()
          , v = c(!1)
          , l = c({ id: "", playUrl: "", freePlayUrl: "" })
          , p = c([])
          , h = c({})
          , I = c([])
          , P = c([]);
        c(!0);
        const u = c({ pageNumber: 1, pageSize: 48, totalPage: null, id: null })
          , a = c(!1)
          , V = c(!1)
          , N = B(() => !v.value ? false : !!(l.value.playUrl && l.value.playUrl.length > 0 || l.value.freePlayUrl && l.value.freePlayUrl.length > 0))
          , E = B(() => {
            if (!l.value) return {};
            const e = { ...l.value };
            if (!e.playUrl && e.freePlayUrl) {
                e.playUrl = e.freePlayUrl;
                e.isTrialVideo = false; // 破解点1：永远标记为非试看视频
                e.loop = true;          // 破解点2：启用循环播放
            } else {
                e.isTrialVideo = false;
                e.loop = true;
            }
            return e;
        })
          , G = () => {}; // 破解点3：空函数，移除试看结束回调

        // 精简无用函数
        const O = () => {}
          , W = async e => e // 简化图片处理
          , S = () => {}     // 精简轮播图获取
          , L = async () => {
            if (l.value.id) {
                v.value = false;
                try {
                    const e = await U.post(`/view/getVideoInfo/${l.value.id}`);
                    if (e.code === 200) {
                        l.value = e.data;
                        y.scrollTop();
                        v.value = true;
                    } else {
                        b.warning(e.message);
                        v.value = true;
                    }
                } catch {
                    v.value = true;
                }
            }
        }
          , j = async () => {
            if (l.value.id) {
                u.value.id = l.value.id;
                U.post("/view/getVideoRecommend", u.value).then(e => {
                    if (e.code === 200) {
                        P.value = e.data.list;
                        u.value.pageNumber = e.data.pageNumber;
                        u.value.totalPage = e.data.totalPage;
                    } else b.warning(e.message);
                });
            }
        }
          , X = () => {
            u.value.pageNumber++;
            j();
        }
          , H = () => {
            y.userInfo?.id ? x.push("/userVip") : (y.loginDialogVisible = true, b.info("请先登录"));
        }
          , J = async () => {
            if (!y.userInfo?.id) {
                y.loginDialogVisible = true;
                b.info("请先登录");
                return;
            }
            U.post(`/user/collectionVideo/${l.value.id}`).then(e => {
                if (e.code === 200) {
                    l.value.isCollection = true;
                    b.success(e.message);
                } else b.warning(e.message);
            });
        }
          , K = () => {}; // 精简视频类型获取

        Y(async () => {
            const e = x.currentRoute.value.query.videoId;
            if (e) {
                l.value.id = e;
                await L();
                j();
                K();
            }
        });
        
        ee(async (e, o, _) => {
            const f = e.query.videoId;
            if (f) {
                l.value = { id: f, playUrl: "", freePlayUrl: "" };
                v.value = false;
                await L();
            }
            _();
        });

        return (e, o) => {
            const _ = oe, f = T, w = ae;
            return d(), m(D, null, [
                r(ve),
                t("div", Ve, [
                    v.value && N.value ? (d(), m("div", we, [r(de, { videoInfo: E.value })])) : k("", true),
                    t("div", null, [
                        t("div", Pe, C(l.value.title), 1),
                        t("div", null, [
                            r(w, { class: "mr-4" }, { default: n(() => [t("div", Ce, [r(f), g(" " + C(l.value.playCount), 1)]) }),
                            r(w, { onClick: J, type: l.value.isCollection ? "success" : "", class: "mr-4 cursor-pointer" }, { default: n(() => [t("div", Te, [r(f), g(" 收藏 ")])]) }),
                            r(w, { onClick: o[2] || (o[2] = s => i(x).push("/userPromotion")), class: "mr-4 cursor-pointer" }, { default: n(() => [t("div", Le, [r(f), g(" 分享 ")])]) })
                        ])
                    ]),
                    t("div", je, [(d(!0), m(D, null, A(p.value, s => (d(), m("div", { key: s.id }, [t("a", { href: s.link, target: "_blank" }, [t("img", { src: s.content, alt: "img", class: "rounded" }, 8, De)]))), 128))]),
                    t("div", Ee, [
                        t("div", Se, [
                            t("div", ze, [t("img", { src: i(ce), alt: "like" }, 8, Ae), g(" 猜你喜欢 ")]),
                            u.value.pageNumber < u.value.totalPage ? (d(), m("small", { key: 0, class: "text-sm text-gray-400 cursor-pointer flex items-center", onClick: X }, [r(f), g(" 换一批 ")])) : k("", true)
                        ]),
                        t("div", null, [r(ue, { videoListVos: P.value, layout: "uniform-grid" })])
                    ])
                ], 64)
            ]);
        };
    }
};

export { tt as default };